$OpenBSD: patch-src_Makefile,v 1.11 2015/06/28 13:33:07 bcallah Exp $
--- src/Makefile.orig	Sat Jun 27 16:41:25 2015
+++ src/Makefile	Sat Jun 27 16:46:27 2015
@@ -234,11 +234,10 @@ $(LIBNAME): $(OBJECTS)
 	$(LIBCOMMAND) $@ $(OBJECTS)
 	$(RANLIB) $@
 
-libfltk.so.1.3: $(OBJECTS)
+libfltk.so.$(LIBfltk_VERSION): $(OBJECTS)
 	echo $(DSOCOMMAND) $@ ...
 	$(DSOCOMMAND) $@ $(OBJECTS) $(LDLIBS)
 	$(RM) libfltk.so
-	$(LN) libfltk.so.1.3 libfltk.so
 
 libfltk.sl.1.3: $(OBJECTS)
 	echo $(DSOCOMMAND) $@ ...
@@ -270,11 +269,9 @@ $(FLLIBNAME): $(FLOBJECTS)
 	$(LIBCOMMAND) $@ $(FLOBJECTS)
 	$(RANLIB) $@
 
-libfltk_forms.so.1.3: $(FLOBJECTS) libfltk.so.1.3
+libfltk_forms.so.$(LIBfltk_forms_VERSION): $(FLOBJECTS) libfltk.so.$(LIBfltk_VERSION)
 	echo $(DSOCOMMAND) $@ ...
 	$(DSOCOMMAND) $@ $(FLOBJECTS) -L. -lfltk $(LDLIBS)
-	$(RM) libfltk_forms.so
-	$(LN) libfltk_forms.so.1.3 libfltk_forms.so
 
 libfltk_forms.sl.1.3: $(FLOBJECTS) libfltk.sl.1.3
 	echo $(DSOCOMMAND) $@ ...
@@ -306,11 +303,9 @@ $(GLLIBNAME): $(GLOBJECTS)
 	$(LIBCOMMAND) $@ $(GLOBJECTS)
 	$(RANLIB) $@
 
-libfltk_gl.so.1.3: $(GLOBJECTS) libfltk.so.1.3
+libfltk_gl.so.$(LIBfltk_gl_VERSION): $(GLOBJECTS) libfltk.so.$(LIBfltk_VERSION)
 	echo $(DSOCOMMAND) $@ ...
 	$(DSOCOMMAND) $@ $(GLOBJECTS) -L. -lfltk $(LDLIBS) $(GLDLIBS)
-	$(RM) libfltk_gl.so
-	$(LN) libfltk_gl.so.1.3 libfltk_gl.so
 
 libfltk_gl.sl.1.3: $(GLOBJECTS) libfltk.sl.1.3
 	echo $(DSOCOMMAND) $@ ...
@@ -342,11 +337,9 @@ $(IMGLIBNAME): $(IMGOBJECTS)
 	$(LIBCOMMAND) $@ $(IMGOBJECTS)
 	$(RANLIB) $@
 
-libfltk_images.so.1.3: $(IMGOBJECTS) libfltk.so.1.3
+libfltk_images.so.$(LIBfltk_images_VERSION): $(IMGOBJECTS) libfltk.so.$(LIBfltk_VERSION)
 	echo $(DSOCOMMAND) $@ ...
 	$(DSOCOMMAND) $@ $(IMGOBJECTS) -L. $(IMAGELIBS) -lfltk $(LDLIBS)
-	$(RM) libfltk_images.so
-	$(LN) libfltk_images.so.1.3 libfltk_images.so
 
 libfltk_images.sl.1.3: $(IMGOBJECTS) libfltk.sl.1.3
 	echo $(DSOCOMMAND) $@ ...
@@ -568,10 +561,9 @@ install: $(LIBNAME) $(DSONAME) \
 		$(RANLIB) $(DESTDIR)$(libdir)/$(GLLIBBASENAME); \
 	fi
 	$(RANLIB) $(DESTDIR)$(libdir)/$(IMGLIBBASENAME)
-	if test x$(DSONAME) = xlibfltk.so.1.3; then\
+	if test x$(DSONAME) = xlibfltk.so.$(LIBfltk_VERSION); then\
 		$(RM) $(DESTDIR)$(libdir)/libfltk.so*;\
-		$(INSTALL_LIB) libfltk.so.1.3 $(DESTDIR)$(libdir); \
-		$(LN) libfltk.so.1.3 $(DESTDIR)$(libdir)/libfltk.so;\
+		$(INSTALL_LIB) libfltk.so.$(LIBfltk_VERSION) $(DESTDIR)$(libdir); \
 	fi
 	if test x$(DSONAME) = xlibfltk.sl.1.3; then\
 		$(RM) $(DESTDIR)$(libdir)/libfltk.sl*;\
@@ -599,10 +591,9 @@ install: $(LIBNAME) $(DSONAME) \
 		$(RM) $(DESTDIR)$(libdir)/libfltk.dll.a;\
 		$(INSTALL_LIB) libfltk.dll.a $(DESTDIR)$(libdir); \
 	fi
-	if test x$(FLDSONAME) = xlibfltk_forms.so.1.3; then\
+	if test x$(FLDSONAME) = xlibfltk_forms.so.$(LIBfltk_forms_VERSION); then\
 		$(RM) $(DESTDIR)$(libdir)/libfltk_forms.so*;\
-		$(INSTALL_LIB) libfltk_forms.so.1.3 $(DESTDIR)$(libdir); \
-		$(LN) libfltk_forms.so.1.3 $(DESTDIR)$(libdir)/libfltk_forms.so;\
+		$(INSTALL_LIB) libfltk_forms.so.$(LIBfltk_forms_VERSION) $(DESTDIR)$(libdir); \
 	fi
 	if test x$(FLDSONAME) = xlibfltk_forms.sl.1.3; then\
 		$(RM) $(DESTDIR)$(libdir)/libfltk_forms.sl*;\
@@ -630,10 +621,9 @@ install: $(LIBNAME) $(DSONAME) \
 		$(RM) $(DESTDIR)$(libdir)/libfltk_forms.dll.a;\
 		$(INSTALL_LIB) libfltk_forms.dll.a $(DESTDIR)$(libdir); \
 	fi
-	if test x$(GLDSONAME) = xlibfltk_gl.so.1.3; then\
+	if test x$(GLDSONAME) = xlibfltk_gl.so.$(LIBfltk_gl_VERSION); then\
 		$(RM) $(DESTDIR)$(libdir)/libfltk_gl.so*;\
-		$(INSTALL_LIB) libfltk_gl.so.1.3 $(DESTDIR)$(libdir); \
-		$(LN) libfltk_gl.so.1.3 $(DESTDIR)$(libdir)/libfltk_gl.so;\
+		$(INSTALL_LIB) libfltk_gl.so.$(LIBfltk_gl_VERSION) $(DESTDIR)$(libdir); \
 	fi
 	if test x$(GLDSONAME) = xlibfltk_gl.sl.1.3; then\
 		$(RM) $(DESTDIR)$(libdir)/libfltk_gl.sl*;\
@@ -661,10 +651,9 @@ install: $(LIBNAME) $(DSONAME) \
 		$(RM) $(DESTDIR)$(libdir)/libfltk_gl.dll.a;\
 		$(INSTALL_LIB) libfltk_gl.dll.a $(DESTDIR)$(libdir); \
 	fi
-	if test x$(IMGDSONAME) = xlibfltk_images.so.1.3; then\
+	if test x$(IMGDSONAME) = xlibfltk_images.so.$(LIBfltk_images_VERSION); then\
 		$(RM) $(DESTDIR)$(libdir)/libfltk_images.so*;\
-		$(INSTALL_LIB) libfltk_images.so.1.3 $(DESTDIR)$(libdir); \
-		$(LN) libfltk_images.so.1.3 $(DESTDIR)$(libdir)/libfltk_images.so;\
+		$(INSTALL_LIB) libfltk_images.so.$(LIBfltk_images_VERSION) $(DESTDIR)$(libdir); \
 	fi
 	if test x$(IMGDSONAME) = xlibfltk_images.sl.1.3; then\
 		$(RM) $(DESTDIR)$(libdir)/libfltk_images.sl*;\
